﻿namespace TestTool.GUI
{
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;

    public class CompactProcessingForm : Form
    {
        private IContainer components;
        private Label lblCompleted;
        private Label lblCompletedCount;
        private Label lblFailed;
        private Label lblFailedCount;
        private Label lblFeatureDefinitionStatus;
        private Label lblTotal;
        private Label lblTotalCount;

        public CompactProcessingForm()
        {
            this.InitializeComponent();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        public void FeatureDefinitionCompleted(int total)
        {
            base.Invoke((Action)delegate
            {
                this.lblFeatureDefinitionStatus.Text = "Feature definition completed";
                this.lblTotalCount.Text = total.ToString();
            });
        }

        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(CompactProcessingForm));
            this.lblFeatureDefinitionStatus = new Label();
            this.lblTotal = new Label();
            this.lblCompleted = new Label();
            this.lblFailed = new Label();
            this.lblTotalCount = new Label();
            this.lblCompletedCount = new Label();
            this.lblFailedCount = new Label();
            base.SuspendLayout();
            this.lblFeatureDefinitionStatus.AutoSize = true;
            this.lblFeatureDefinitionStatus.Location = new Point(13, 13);
            this.lblFeatureDefinitionStatus.Name = "lblFeatureDefinitionStatus";
            this.lblFeatureDefinitionStatus.Size = new Size(0xb0, 13);
            this.lblFeatureDefinitionStatus.TabIndex = 0;
            this.lblFeatureDefinitionStatus.Text = "Feature definition process is running";
            this.lblTotal.AutoSize = true;
            this.lblTotal.Location = new Point(12, 0x24);
            this.lblTotal.Name = "lblTotal";
            this.lblTotal.Size = new Size(0x22, 13);
            this.lblTotal.TabIndex = 1;
            this.lblTotal.Text = "Total:";
            this.lblCompleted.AutoSize = true;
            this.lblCompleted.Location = new Point(13, 0x3a);
            this.lblCompleted.Name = "lblCompleted";
            this.lblCompleted.Size = new Size(60, 13);
            this.lblCompleted.TabIndex = 2;
            this.lblCompleted.Text = "Completed:";
            this.lblFailed.AutoSize = true;
            this.lblFailed.Location = new Point(13, 0x52);
            this.lblFailed.Name = "lblFailed";
            this.lblFailed.Size = new Size(0x26, 13);
            this.lblFailed.TabIndex = 3;
            this.lblFailed.Text = "Failed:";
            this.lblTotalCount.AutoSize = true;
            this.lblTotalCount.Location = new Point(0x47, 0x24);
            this.lblTotalCount.Name = "lblTotalCount";
            this.lblTotalCount.Size = new Size(0, 13);
            this.lblTotalCount.TabIndex = 4;
            this.lblCompletedCount.AutoSize = true;
            this.lblCompletedCount.Location = new Point(80, 0x3a);
            this.lblCompletedCount.Name = "lblCompletedCount";
            this.lblCompletedCount.Size = new Size(0, 13);
            this.lblCompletedCount.TabIndex = 5;
            this.lblFailedCount.AutoSize = true;
            this.lblFailedCount.Location = new Point(0x47, 0x52);
            this.lblFailedCount.Name = "lblFailedCount";
            this.lblFailedCount.Size = new Size(0, 13);
            this.lblFailedCount.TabIndex = 6;
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.ClientSize = new Size(0x153, 0xab);
            base.Controls.Add(this.lblFailedCount);
            base.Controls.Add(this.lblCompletedCount);
            base.Controls.Add(this.lblTotalCount);
            base.Controls.Add(this.lblFailed);
            base.Controls.Add(this.lblCompleted);
            base.Controls.Add(this.lblTotal);
            base.Controls.Add(this.lblFeatureDefinitionStatus);
            base.MaximizeBox = false;
            base.Icon = (Icon)manager.GetObject("$this.Icon");
            base.Name = "CompactProcessingForm";
            this.Text = "TestTool - compact version";
            base.ResumeLayout(false);
            base.PerformLayout();
        }

        public void ReportProgress(int completed, int failed)
        {
            base.Invoke((Action)delegate
            {
                this.lblCompletedCount.Text = completed.ToString();
                this.lblFailedCount.Text = failed.ToString();
            });
        }
    }
}

